package com.ysh.springmvc.controller;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpSession;

/**
 * 袁胜虎 on 2022/8/30 22:20
 */
@RestController
public class LoginController {
    @RequestMapping("/login")
    public String login(HttpSession session){
        session.setAttribute("user","zhangsan");
        return "session";
    }
}
